package com.zretc.entity;

import java.io.Serializable;

public class Pig implements Serializable{
	
	private int id;
	private String name;
	
	public void objectinit() {
		System.out.println("其他初始化操作,这个方法会执行");
	}
	
	public void objectdestroy() {
		System.out.println("对象内部的销毁的方法,这个objectdestroy会执行");
	}
	
	public Pig() {
		System.out.println("pig的构造操作");
	}
	
	
	@Override
	public String toString() {
		return "Pig [id=" + id + ", name=" + name + "]";
	}
	/**
	 * @return the id
	 */
	public int getId() {
		return id;
	}
	/**
	 * @param id the id to set
	 */
	public void setId(int id) {
		this.id = id;
	}
	/**
	 * @return the name
	 */
	public String getName() {
		return name;
	}
	/**
	 * @param name the name to set
	 */
	public void setName(String name) {
		this.name = name;
	}
	

}
